﻿using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp.对比较
{
    public class TestJson
    {
        public static void jsonEqual()
        {

            string json1 = "[{\"id\":\"1\",\"Name\":\"刘德华\",\"age\":\"33\"},{\"id\":\"2\",\"Name\":\"张学友\",\"age\":\"55\"}]";
            string json2 = "[{\"id\":\"1\",\"age\":\"33\",\"Name\":\"刘德华\"},{\"id\":\"2\",\"age\":\"55\",\"Name\":\"张学友\"}]";
            var rel1 = JArray.Parse(json1);
            var rel2 = JArray.Parse(json2);
            var rel3 = JArray.DeepEquals(rel1, rel2); 
            Console.WriteLine(rel3);
            Console.ReadLine();
        }
    }
}
